<?php
/*
 * 后台管理接口
 */
namespace Admin\Controller;
use Think\Controller;

class AdminController extends Controller {

    /**
     * 登录
     */
    public function login() {
        if (login(strtoupper(I('post.form-username')),
            strtoupper(I('post.form-password')))) {
            $this->display(':index');
        } else {
            $this->display(':login');
        }
    }

    /**
     * 登出
     */
    public function logout() {
        logout();
        $this->display(':login');
    }

}